#ifndef BOARD_H //棋盘类
#define BOARD_H//数据与逻辑兼具

#include "cell.h" //包含方格类

class board
{
private:
    board & copy(const board&);
    cell* cells;//方块数组
    int board_h;//高
    int board_w;//宽

public:
    board(){}
    board(int,int,int,int);//构造
    board(const board& bd){copy(bd);}//构造
    cell& get_a_cell(int,int)const;
    void clear_board();
    void set_cell_color(cell&,int);//写入
    void update_rows();
    int get_cell_color(cell &);//读取
    bool is_full(int);
    bool is_empty(int);
    bool is_something(int);
    void clear_row(int);
    void row_cut_paste(int,int);//逻辑判断
    const QPoint get_start_location(int,int,int);
    board& operator =(const board& bd ){return copy(bd);}
    ~board();

};

#endif // BOARD_H
